Skip to content

Fix glossary termId → ref to match spec#95

Merged
gvonness-apolitical merged 1 commit intomainfrom
fix/glossary-termid-to-ref
Feb 16, 2026
Merged

Fix glossary termId → ref to match spec#95
gvonness-apolitical merged 1 commit intomainfrom
fix/glossary-termid-to-ref

Conversation

@gvonness-apolitical
Copy link
Collaborator

Summary

  • Change ExtensionMark::glossary() to emit "ref" instead of "termId", matching the spec's glossaryMark schema
  • Update GlossaryRef serde to serialize as "ref" with alias = "termId" for backward compatibility
  • Add get_glossary_ref() and normalize_glossary_attrs() helpers (same pattern as the citation fix in Fix citation ref → refs to support multi-citation clusters #93)
  • Bump version to 0.7.0 (wire format change)

Test plan

  • cargo test --workspace --all-features — 1055 tests pass
  • schema_glossary_emits_ref verifies new output uses "ref" and "termId" is absent
  • test_get_glossary_ref_legacy verifies old "termId" documents are still readable
  • test_normalize_glossary_attrs verifies in-place migration from "termId""ref"
  • GlossaryRef struct roundtrips with both "ref" and "termId" input

Same pattern as the citation ref → refs fix: update the glossary mark
constructor to emit "ref" instead of "termId", add backward-compat
helpers (get_glossary_ref, normalize_glossary_attrs), and update
GlossaryRef serde to serialize as "ref" while accepting both forms.

Bump version to 0.7.0 (wire format change).
@codecov
Copy link

codecov bot commented Feb 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@gvonness-apolitical gvonness-apolitical merged commit c9d9e91 into main Feb 16, 2026
16 checks passed
@gvonness-apolitical gvonness-apolitical deleted the fix/glossary-termid-to-ref branch February 16, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant